<template>
  <router-view v-slot="{ Component }">
  <!-- 控制路由无需缓存 -->
    <keep-alive exclude="Search,SearchResult,ArticleDetail,UserEdit">
      <component :is="Component" />
    </keep-alive>
  </router-view>
</template>

<script setup>
// import { getCurrentInstance, onMounted } from '@vue/runtime-core'
// const { proxy } = getCurrentInstance()
// 获取频道列表
// const getAllchannels = async () => {
//   try {
//     const res = await proxy.$http.getAllChannelsAPI()
//     console.log(res)
//   } catch (err) {
//     // 弹窗提示
//     console.log(err)
//   }
// }
// onMounted(() => {
//   getAllchannels()
// })
</script>

<style></style>
